//========encoding:utf-8=========
/*
 * @describe:  三目运算符
 * @author:mhao
 * @copyright:chinasoft.cn
 * @date:2020年3月17日   下午10:39:54
 */
package edu.chinasoft.handle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import edu.chinasoft.pojo.JavaBean;

@Controller("handler03")
@RequestMapping("/handler03")
public class Handler03 {
	private Logger logger = LoggerFactory.getLogger(Handler03.class);

    ///handler02/method01.do
    @RequestMapping(value = "/method01.do",method = {RequestMethod.GET,RequestMethod.POST})
    public ModelAndView  method01(ModelAndView modelAndView, int[] intForArray){
        logger.info("Handler03>>>method01 start ……");

        modelAndView.addObject("key01", intForArray);
        modelAndView.setViewName("/loginsuccess");
        logger.info("Handler03>>>method01 end ……");
        return modelAndView;
    }
    @RequestMapping(value = "/method02.do",method = {RequestMethod.GET,RequestMethod.POST})
    public ModelAndView  method02(ModelAndView modelAndView, JavaBean javaBean){
        logger.info("Handler03>>>method02 start ……");
        modelAndView.addObject("key01", javaBean.getPeopleArray());
        modelAndView.setViewName("/loginsuccess");
        logger.info("Handler03>>>method02 end ……");
        return modelAndView;

    }
}
